package com.tencent.wxcloudrun.controller.vo;

import com.tencent.wxcloudrun.controller.form.LoginRequestForm;
import com.tencent.wxcloudrun.model.User;
import lombok.Data;


@Data
public class AuthInfoVo {
    private Long id;

    private String mobile; // 手机号（唯一）

    private String authToken;

    private Boolean needSetNewPassword;


    public static AuthInfoVo buildByUser(User user, String authToken, Boolean needSetNewPassword) {
        AuthInfoVo vo = new AuthInfoVo();
        vo.setId(user.getId());
        vo.setMobile(user.getMobile());
        vo.setAuthToken(authToken);
        vo.setNeedSetNewPassword(needSetNewPassword);
        return vo;
    }

}
